(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
length(cons(x, l)) →+ s(length(l))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [l / cons(x, l)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)